knitr::opts_chunk$set(error = TRUE)
rm(list=ls(all=TRUE))  ## Clear all
setwd("/Users/jmoutouama/Documents/EEBCourse/PhyloMeth/PhyloMeth2020")

Assignment: PhyloMeth

Week1: Getting Started

#install.packages("ctv") #the CRAN task view package

#library(ctv) #to load the package
#install.views(c("Phylogenetics", "WebTechnologies"))
#Bioconductor is a separate repository with lots of packages for dealing with genetic data, especially nextgen data. To install this and a few initial packages:

#if (!requireNamespace("BiocManager", quietly = TRUE))
#    install.packages("BiocManager")
#BiocManager::install(version = "3.10")
#BiocManager::install("Biostrings", ask=FALSE)

##Experience with coding.
##Function to plot any order in R.
GetTrees <- function(Order) {
    library(ape)
  X <- c("red", "orange", "yellow", "green", "blue", "purple")
    result<-plot(Order, type = "c", use.edge.length = FALSE,
     edge.color = sample(X, length(bird.orders$edge)/2, replace = TRUE),
     edge.width = rep(5, length(bird.orders$edge)/2))
segments(rep(0, 6), 6.5:1.5, rep(2, 6), 6.5:1.5, lwd = 5, col = X)
text(rep(2.5, 6), 6.5:1.5, paste(X, "..."), adj = 0)
title("Fancy tree...")
    return(result)
}

#let's use the data in ape
library(ape)
data("bird.orders")
GetTrees(bird.orders)

## $type
## [1] "cladogram"
## 
## $use.edge.length
## [1] FALSE
## 
## $node.pos
## [1] 2
## 
## $node.depth
## [1] 1
## 
## $show.tip.label
## [1] TRUE
## 
## $show.node.label
## [1] FALSE
## 
## $font
## [1] 3
## 
## $cex
## [1] 1
## 
## $adj
## [1] 0
## 
## $srt
## [1] 0
## 
## $no.margin
## [1] FALSE
## 
## $label.offset
## [1] 0
## 
## $x.lim
## [1]  0.0000 36.8954
## 
## $y.lim
## [1]  1 23
## 
## $direction
## [1] "rightwards"
## 
## $tip.color
## [1] "black"
## 
## $Ntip
## [1] 23
## 
## $Nnode
## [1] 22
## 
## $root.time
## NULL
## 
## $align.tip.label
## [1] FALSE

Week2: Getting Trees and Data

## Let's use the fonction made by Brian to do so. Here I want to make a tree from  Open Tree of Life 
#source("Tree from Open Source.R")
#GetTreeFromOpenTree("Thunbergia")
# I got here just one node. Therefore, my tree had no information


## Let's make a tree from a studies

#install.packages("devtools")
#devtools::install_github("ropensci/rotl")
#library("rotl")



## Now we can run the function with P_class as input. Here p_class is any class of species (Eg. Mammalia)
GetTreeFromOpenTree <- function(p_class) {
  library(rotl)
  library(ape)
  p_class.studies <- studies_find_studies(property="ot:focalCladeOTTTaxonName",
    value=p_class)
  print(p_class.studies)
  p_class.studies.ids <- unlist(p_class.studies$study_ids)
  p_class.study1.metadata <- get_study_meta(p_class.studies[[1]][[1]])
  print(get_publication(p_class.study1.metadata))
  study_id1<-p_class.studies.ids[1]
  study_tree1<-list_trees(p_class.studies,p_class.studies.ids[1])[1]
  p_class.tree<-get_tree_ids( p_class.study1.metadata)
  p_class.study1.tree1 <- get_study_tree(study_id1, study_tree1)
  plot.phylo(p_class.study1.tree1, type="fan", cex=0.2)
  return.list <- list(p_class.tree, p_class.study1.tree1 )
  names(return.list) <- c("p_class.tree", "study1.tree")
  return(return.list)
}

GetTreeFromOpenTree("Mammalia")
##   study_ids n_trees                                              tree_ids
## 1   pg_2582       1                                              tree5988
## 2   pg_2647       2                                    tree6169, tree6170
## 3   pg_2812       2                                    tree6545, tree6546
## 4   ot_1366       1                                               Tr98763
## 5    ot_308       3                                   tree1, tree2, tree3
## 6   pg_1428       2                                    tree2855, tree2856
## 7    ot_109       1                                                 tree1
## 8   pg_2550      10 tree5513, tree5515, tree5516, tree5517, tree5518, ...
## 9    ot_755       1                                                 tree1
##   candidate study_year
## 1                 2006
## 2  tree6169       2013
## 3  tree6545       2012
## 4                 2017
## 5     tree1       2007
## 6  tree2855       2011
## 7     tree1       2012
## 8                 2004
## 9     tree1       2016
##                                                                                                                                     title
## 1                                                                                       A higher-level MRP supertree of placental mammals
## 2                                                                 The placental mammal ancestor and the post-K-Pg radiation of placentals
## 3          Joint reconstruction of divergence times and life-history evolution in placental mammals using a phylogenetic covariance model
## 4                          'Waking the undead: Implications of a soft explosive model for the timing of placental mammal diversification'
## 5                                                                                                 The delayed rise of present-day mammals
## 6                                           Impacts of the Cretaceous Terrestrial Revolution and KPg Extinction on Mammal Diversification
## 7                                                                                     Genome-scale coestimation of species and gene trees
## 8 "Building the mammalian sector of the tree of life: Combining different data and a discussion of divergence times for placental mammals
## 9                                                                  Multiple morphological clocks and total-evidence tip-dating in mammals
##                                            study_doi
## 1           http://dx.doi.org/10.1186/1471-2148-6-93
## 2          http://dx.doi.org/10.1126/science.1229237
## 3 http://dx.doi.org/10.1111/j.1558-5646.2011.01558.x
## 4      http://dx.doi.org/10.1016/j.ympev.2016.09.017
## 5              http://dx.doi.org/10.1038/nature05634
## 6          http://dx.doi.org/10.1126/science.1211028
## 7            http://dx.doi.org/10.1101/gr.141978.112
## 8                                                   
## 9           http://dx.doi.org/10.1098/rsbl.2016.0033
## [1] "Beck, R.M.D., O.R.P Bininda-Emonds, M. Cardillo, F.-G. Liu, A. Purvis. 2006. A higher-level MRP supertree of placental mammals. BMC Evolutionary Biology 6: 93."
## attr(,"DOI")
## [1] "http://dx.doi.org/10.1186/1471-2148-6-93"

## $p_class.tree
## [1] "tree5988"
## 
## $study1.tree
## 
## Phylogenetic tree with 115 tips and 113 internal nodes.
## 
## Tip labels:
##  Abrocomidae, Agoutidae, Caviidae, Hydrochaeridae, Dasyproctidae, Capromyidae, ...
## 
## Rooted; no branch lengths.

Week4: Gene Tree Species Tree

#devtools::install_github("bomeara/phybase")
library(rotl)
library(ape)
phy <- get_study_tree("ot_485", "tree1")
plot(phy, cex=0.3)

library(geiger)
## Registered S3 method overwritten by 'geiger':
##   method            from
##   unique.multiPhylo ape
phy <- drop.random(phy, Ntip(phy) - 10)
plot(phy)

library(phybase)
## Loading required package: Matrix
## 
## Attaching package: 'phybase'
## The following objects are masked from 'package:ape':
## 
##     node.height, write.dna
gene.tree <- phybase::sim.coaltree.phylo(phy, pop.size=1e-12)
plot(gene.tree)

library(phytools)
## Loading required package: maps
## Registered S3 method overwritten by 'phytools':
##   method      from  
##   logLik.gfit geiger
plot(cophylo(phy, gene.tree, cbind(sort(phy$tip.label), sort(gene.tree$tip.label))))
## Rotating nodes to optimize matching...
## Done.

## Rotating nodes to optimize matching...
## Done.

species.tree <- rcoal(7)
species.tree$edge.length <- species.tree$edge.length / (10*max(branching.times(species.tree)))
gene.tree <- phybase::sim.coaltree.phylo(species.tree)
plot(cophylo(species.tree, gene.tree, cbind(sort(species.tree$tip.label), sort(gene.tree$tip.label))))
## Rotating nodes to optimize matching...
## Done.

Week 5: See RevBayes file in the file and the output

Week 6: DiscreteCharacters

# Data from Brandley et al. (2008)
library(ape)
library(phytools)
sqData<-read.csv("brandley_table.csv")
head(sqData)
##               Species   SVL   TL   SE FLL HLL Fingers Toes
## 1 Agamodon anguliceps  74.7  8.3  3.1 0.0   0       0    0
## 2    Amphisbaena alba 474.0 40.1 12.6 0.0   0       0    0
## 3       Bipes biporus 167.2 16.0  3.6 6.1   0       5    0
## 4   Bipes caniculatus 182.5 29.6  4.5 6.5   0       4    0
## 5   Bipes tridactylus 127.5 36.0  3.7 6.0   0       3    0
## 6     Blanus cinereus 174.9 21.8  4.1 0.0   0       0    0
sqTree<-read.nexus("squamate.tre.txt")
#To get a character for “limbed” versus “limbless” we will have to create it by finding all species with all limbs of length 0.
hindLimbs<-sqData[,"HLL"]!=0
foreLimbs<-sqData[,"FLL"]!=0
limbless<-!hindLimbs & !foreLimbs
limbless
#Now we need to set our species names to match our tree, and assign these names to our trait vector:
speciesNames<-sqData[,1]
speciesNames
species<-sub(" ","_",speciesNames)
#names(limbless)<-species
#Now, we can change what we are calling our character values (although TRUE & FALSE would be fine):
limbs<-sapply(limbless,function(x) if(x) 0 else 1)
class (limbs)
## Now we create a data frame to clean these data
limbs.data<-data.frame(species,limbs)
#library(devtools)
#devtools::install_github("phylotastic/rphylotastic")
library(rphylotastic)
library(geiger)
str(limbs)
##  num [1:261] 0 0 1 1 1 0 0 0 0 0 ...
CleanData <- function(phy, data) {
  library(rphylotastic)
  speciesNames<-unlist(data[,1], use.names = FALSE)
  cleaned.names.data<-taxa_resolve_names_with_gnr(speciesNames)
  cleaned.names.phy<-taxa_resolve_names_with_gnr(phy$tip.label)
  phy.cleaned.names<-phy
  phy.cleaned.names$tip.label <- cleaned.names.phy
  data.vector<-data[,2]
  names(data.vector)<-cleaned.names.data
  cleaned.data<-treedata(phy.cleaned.names,data.vector, sort=TRUE, warnings=TRUE)
  return(cleaned.data)
}

cleaned.discrete<-CleanData(sqTree,limbs.data)
## Warning in treedata(phy.cleaned.names, data.vector, sort = TRUE, warnings = TRUE): The following tips were not found in 'phy' and were dropped from 'data':
##  Gonatodes albogularis
##  Lepidophyma flavimaculatum
##  Trachyboa boulengeri
class(cleaned.discrete[[2]])
VisualizeData <- function(phy, data) {
   dotTree(phy,data[,1],colors=setNames(c("blue","red"),c(1,0)),type="fan",fsize=0.3,lwd=2)
}



VisualizeData(cleaned.discrete$phy,cleaned.discrete$data)

##First, let’s use parsimony to look at ancestral states:
library( phangorn)
## 
## Attaching package: 'phangorn'
## The following objects are masked from 'package:phybase':
## 
##     treedist, upgma
data(Laurasiatherian)
cleaned.discrete.phydat<-as.phyDat(cleaned.discrete$data, type="USER", levels = c("1","0"), ambiguity="-")
cleaned.discrete.tree<-pml(cleaned.discrete$phy, cleaned.discrete.phydat)
anc.p <- ancestral.pars(cleaned.discrete$phy, cleaned.discrete.phydat, type = "MPR", cost = NULL,return = "prob")
plotAnc(cleaned.discrete.tree, anc.p, 1)

anc.ml <- ancestral.pml(pml(cleaned.discrete$phy, cleaned.discrete.phydat), type="ml")
plotAnc(cleaned.discrete.tree, anc.ml, 1)

## Yes the second tree differ from the first. it seems like the second tree has more precision. 
#How can you estimate transition rates between states ? By using the fitdiscrete function in geiger
## we can do that by fitting a  model with different backward & forward rates. In this case this would be a "ARD" ('all-rates-different') model:
cleaned.discrete$data[,1]<-as.factor(cleaned.discrete$data[,1])# to covert 0 and 1 to factor
fitARD<-fitDiscrete(cleaned.discrete$phy, cleaned.discrete$data[,1],model="ARD")
fitARD
## GEIGER-fitted comparative model of discrete data
##  fitted Q matrix:
##                  1            2
##     1 -0.003824740  0.003824740
##     2  0.001610655 -0.001610655
## 
##  model summary:
##  log-likelihood = -79.383812
##  AIC = 162.767624
##  AICc = 162.814682
##  free parameters = 2
## 
## Convergence diagnostics:
##  optimization iterations = 100
##  failed iterations = 0
##  frequency of best fit = 0.05
## 
##  object summary:
##  'lik' -- likelihood function
##  'bnd' -- bounds for likelihood search
##  'res' -- optimization iteration summary
##  'opt' -- maximum likelihood parameter estimates
#How could you examine if transition rates are equal? 
#By using 'equal-rates' or "ER" model.This model is one in which there is just one rate of evolution from limblessness to having limbs, and vice versa. 
#Think about the Lewis (2001) MKV model. Are your traits all variable? Will using this make sense for your data? Try using it. Do results change?
#Conduct stochastic mapping.Here, I generate 150 stochastic character maps from our dataset. 
library(diversitree)
mtrees<-make.simmap(cleaned.discrete$phy, cleaned.discrete$data[,1],model="ER",nsim=150)
## make.simmap is sampling character histories conditioned on the transition matrix
## 
## Q =
##              1            2
## 1 -0.001864317  0.001864317
## 2  0.001864317 -0.001864317
## (estimated using likelihood);
## and (mean) root node prior probabilities
## pi =
##   1   2 
## 0.5 0.5
## Done.
mtrees
## 150 phylogenetic trees with mapped discrete characters
# Let's  estimate the number of changes of each type, the proportion of time spent in each state, and the posterior probabilities that each internal node is in each state, under our model. yes there is a change in the transition rate 
pd<-summary(mtrees)
pd
## 150 trees with a mapped discrete character with states:
##  1, 2 
## 
## trees have 22.68 changes between states on average
## 
## changes are of the following types:
##           1,2      2,1
## x->y 5.906667 16.77333
## 
## mean total time spent in each state is:
##                 1            2    total
## raw  2037.8212069 1.013291e+04 12170.74
## prop    0.1674362 8.325638e-01     1.00
#let's compare the posterior probabilities from stochastic mapping with our marginal ancestral states. In fact, we expect these to be the same (as our number of stochastic character map samples goes to ∞).

#fitER<-ace(cleaned.discrete$phy, cleaned.discrete$data,model="ER",type="discrete") 
#plot(fitER$lik.anc,pd$ace,xlab="marginal ancestral states",
#    ylab="posterior probabilities from stochastic mapping",
#    pch=21,cex=1.4,bg="grey")
#lines(c(0,1),c(0,1),lty="dashed",col="red",lwd=2)

#str(cleaned.discrete$data)
#class(cleaned.discrete$phy)
#How could you test order of state evolution?
# We can fit a model in which transitions to limblessness are permitted, but not the reverse. To do so we will built a matrix See bellow. We can also fit anotehr model with the opposite assumption. The goal being to estimate the transtion rate bewteen state and compare the AICc 
model<-matrix(c(0,0,1,0),2,2)
fitIrr<-fitDiscrete(cleaned.discrete$phy, cleaned.discrete$data[,1],model=model)
## Warning in fitDiscrete(cleaned.discrete$phy, cleaned.discrete$data[, 1], : Parameter estimates appear at bounds:
##  q21
model
##      [,1] [,2]
## [1,]    0    1
## [2,]    0    0

Week 7: Continuous character models

#install.packages("yearn")
library(ape) 
library(geiger) 
library(OUwie)
## Loading required package: nloptr
## Loading required package: lattice
library(phytools)
#library(devtools)
#devtools::install_github("phylotastic/rphylotastic")
library(rphylotastic)
## This data come from  Brandley et al. (2008)

sqData<-read.csv("brandley_table.csv")
sqTree<-read.nexus ("squamate.tre.txt")
plotTree(sqTree,ftype="i",lwd=1)

speciesNames<-sqData[,1]
speciesNames
species<-sub(" ","_",speciesNames)
sqData[,1]<-species
head(sqData)
CleanData <- function(phy, data) {
  speciesNames<-unlist(data[,1], use.names = FALSE)
  cleaned.names.data<-taxa_resolve_names_with_gnr(speciesNames)
  cleaned.names.phy<-taxa_resolve_names_with_gnr(phy$tip.label)
  phy.cleaned.names<-phy
  phy.cleaned.names$tip.label <- cleaned.names.phy
  data.vector<-data[,2]
  names(data.vector)<-cleaned.names.data
  cleaned.data<-treedata(phy.cleaned.names,data.vector, sort=TRUE, warnings=TRUE)
  return(cleaned.data)
}

cleaned.data<-CleanData(sqTree,sqData)
## Warning in treedata(phy.cleaned.names, data.vector, sort = TRUE, warnings = TRUE): The following tips were not found in 'phy' and were dropped from 'data':
##  Gonatodes albogularis
##  Lepidophyma flavimaculatum
##  Trachyboa boulengeri
VisualizeData <- function(phy, data) {
   diagnostic<-contMap(phy, data, res=100, fsize=NULL, ftype=NULL, lwd=4, legend=NULL,
       lims=NULL, outline=TRUE, sig=3, type="phylogram", direction="rightwards",
       plot=FALSE)
   plot(diagnostic)
}

VisualizeData(cleaned.data$phy,cleaned.data$data[,1])

## Brownian motion is a stochastic model in which changes from one time to the next are random draws from a normal distribution with mean 0.0 and variance σ2 × Δt. In other words, the expected variance under Brownian motion increases linearly through time with instantaneous rate σ2.

BM2<-fitContinuous(cleaned.data$phy,cleaned.data$data[,1],model="BM") 
BM2
## GEIGER-fitted comparative model of continuous data
##  fitted 'BM' model parameters:
##  sigsq = 138.341054
##  z0 = 169.171661
## 
##  model summary:
##  log-likelihood = -1502.985290
##  AIC = 3009.970579
##  AICc = 3010.017638
##  free parameters = 2
## 
## Convergence diagnostics:
##  optimization iterations = 100
##  failed iterations = 0
##  frequency of best fit = 1.00
## 
##  object summary:
##  'lik' -- likelihood function
##  'bnd' -- bounds for likelihood search
##  'res' -- optimization iteration summary
##  'opt' -- maximum likelihood parameter estimates
#Here we see that the rate of evolution is  138.341054 in 169.171661 unit of  time. 
OU1 <- fitContinuous(cleaned.data$phy, cleaned.data$data, model="OU")
## Warning in fitContinuous(cleaned.data$phy, cleaned.data$data, model = "OU"):
## Non-ultrametric tree with OU model, using VCV method.
## Warning in cache$dat - mu: Recycling array of length 1 in vector-array arithmetic is deprecated.
##   Use c() or as.vector() instead.

## Warning in cache$dat - mu: Recycling array of length 1 in vector-array arithmetic is deprecated.
##   Use c() or as.vector() instead.
ou.tree <- rescale(cleaned.data$phy, model="OU", 0.005)
par(mfcol=(c(1,2)))
plot(cleaned.data$phy, show.tip.label=FALSE)
plot(ou.tree)

##These trees are slighly differents. The second tree vary according to the value of a. As a, the parameter used for transformation increase, the time for diversifation decrease
AIC.BM2 <- BM2$opt$aicc
AIC.OU1 <- OU1$opt$aicc
AIC.BM2
## [1] 3010.018
AIC.OU1 
## [1] 3012.065
delta_aic<-function(x) x-x[which(x==min(x))]
delta_aic(c(AIC.BM2, AIC.OU1))
## [1] 0.000000 2.047407
## it seems like the he Brownian motion model (Felsenstein 1973) looks better because it has the smallest AIC
#one.discrete.char <-limbs 
reconstruction.info <- ace(cleaned.discrete$data,cleaned.discrete$phy, type="discrete", method="ML", CI=TRUE)
best.states <- colnames(reconstruction.info$lik.anc)[apply(reconstruction.info$lik.anc, 1, which.max)]
class(best.states)
## [1] "character"
library(OUwie)
## The function Ouwie uses a data frame with three columns. First columns with species names. The second column is the  selective regime and the third one is the continuous traits 
newdat <-data.frame(names=rownames(cleaned.data$data))
#str(newdat)
#newdat[,1]
#newdat[,2]
cleaned.data$phy$node.label<-best.states
newdat <-data.frame(names=rownames(cleaned.data$data),regime=cleaned.discrete$data[[1]], trait=cleaned.data$data[,1])
nodeBased.OUMV <- OUwie(cleaned.data$phy, newdat,model="OUMV", simmap.tree=FALSE, diagn=FALSE)
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Initializing... 
## Finished. Begin thorough search... 
## Finished. Summarizing results.
print(nodeBased.OUMV)
## 
## Fit
##        lnL      AIC     AICc      BIC model ntax
##  -1470.432 2950.863 2951.101 2968.628  OUMV  258
## 
## 
## Rates
##                     1            2
## alpha    2.345336e-09 2.345336e-09
## sigma.sq 2.922578e+02 4.516810e+00
## 
## Optima
##                 1        2
## estimate 469.6925 88.61548
## se       135.7585 18.65365
## 
## 
## Half life (another way of reporting alpha)
##         1         2 
## 295542742 295542742 
## 
## Arrived at a reliable solution
library(OUwie)
models <- c("BM1","BMS","OU1","OUM","OUMV","OUMA","OUMVA")
runmod<-function(phy, data, models){
  mod<-OUwie(phy, data, models, simmap.tree = F, diagn = F)
}
## running lapply
results<- lapply(models, runmod, phy = cleaned.data$phy, data = newdat)
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Initializing... 
## Finished. Begin thorough search... 
## Finished. Summarizing results.
## Warning: By setting root.station=TRUE, you have specified the group means model
## of Thomas et al. 2006
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Initializing... 
## Finished. Begin thorough search... 
## Finished. Summarizing results.
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Initializing... 
## Finished. Begin thorough search... 
## Finished. Summarizing results.
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Initializing... 
## Finished. Begin thorough search... 
## Finished. Summarizing results.
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Initializing... 
## Finished. Begin thorough search... 
## Finished. Summarizing results.
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Initializing... 
## Finished. Begin thorough search... 
## Finished. Summarizing results.
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Initializing... 
## Finished. Begin thorough search... 
## Finished. Summarizing results.
results$AICc  
## NULL
AICc.values<-sapply(results, "[[", "AICc")
names(AICc.values)<-models
AICc.values<-AICc.values-min(AICc.values)
best<-results[[which.min(AICc.values)]]
?OUwie.fixed
# Nornally alpha vary from exp(-500) to exp(1). But let take these values 
alpha.values<-seq(from=1.637367e-06  , to= 0.2664882 , length.out=50)
library(OUwie)
likelihood.values <- rep(NA, length(alpha.values))
best$solution
##                     1         2
## alpha    1.637367e-06 0.2664882
## sigma.sq 2.150683e+00 2.1506830
for (iteration in sequence(length(alpha.values))) {
    likelihood.values[iteration] <- OUwie.fixed(cleaned.data$phy, newdat, model="OUMV", alpha=rep(alpha.values[iteration],2), sigma.sq=best$solution[2,], theta=best$theta[,1])$loglik
}
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 1.637367e-06 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.005440139 0.005440139 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.01087864 0.01087864 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.01631714 0.01631714 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.02175564 0.02175564 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.02719414 0.02719414 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.03263265 0.03263265 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.03807115 0.03807115 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.04350965 0.04350965 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.04894815 0.04894815 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.05438665 0.05438665 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.05982515 0.05982515 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.06526365 0.06526365 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.07070215 0.07070215 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.07614066 0.07614066 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.08157916 0.08157916 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.08701766 0.08701766 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.09245616 0.09245616 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.09789466 0.09789466 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1033332 0.1033332 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1087717 0.1087717 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1142102 0.1142102 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1196487 0.1196487 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1250872 0.1250872 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1305257 0.1305257 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1359642 0.1359642 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1414027 0.1414027 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1468412 0.1468412 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1522797 0.1522797 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1577182 0.1577182 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1631567 0.1631567 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1685952 0.1685952 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1740337 0.1740337 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1794722 0.1794722 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1849107 0.1849107 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1903492 0.1903492 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.1957877 0.1957877 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2012262 0.2012262 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2066647 0.2066647 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2121032 0.2121032 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2175417 0.2175417 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2229802 0.2229802 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2284187 0.2284187 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2338572 0.2338572 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2392957 0.2392957 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2447342 0.2447342 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2501727 0.2501727 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2556112 0.2556112 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2610497 0.2610497 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 0.2664882 0.2664882 2.150683 2.150683 1.677575e-18 159.0305
plot(x=alpha.values  , y= likelihood.values, xlab=" alpha", ylab="maximum log-likelihood", type="l", bty="n")
points(x=best$solution[1,1], y=best$loglik, pch=16, col="red")
text(x=best$solution[1,1], y=best$loglik, "unconstrained best", pos=4, col="red")

require("akima")
## Loading required package: akima
nreps<-400
theta1.points<-c(best$theta[1,1], rnorm(nreps-1, best$theta[1,1], 5*best$theta[1,2])) #center on optimal value, have extra variance
theta2.points<-c(best$theta[2,1], rnorm(nreps-1, best$theta[2,1], 5*best$theta[2,2])) #center on optimal value, have extra variance
likelihood.values<-rep(NA,nreps)

for (iteration in sequence(nreps)) {
    likelihood.values[iteration] <- OUwie.fixed(cleaned.data$phy, newdat, model="OUMV", alpha=best$solution[1,], sigma.sq=best$solution[2,], theta=c(theta1.points[iteration], theta2.points[iteration]))$loglik
}
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 159.0305
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1256958
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -5108927
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 280797.4
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1742580
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1774691
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1114493
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1081749
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 4861876
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 9517511
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1837012
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3447071
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -7743580
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2311845
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1699906
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2468626
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3003052
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1929928
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 6681833
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -632171.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1172987
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2741382
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5016135
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2326475
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1044548
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -7058719
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1244367
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 6046958
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2020140
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5201214
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -5023770
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -78784.25
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -43164.11
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1995959
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -440708.3
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1006343
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -587679.6
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -214644.3
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -28124.72
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4033735
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3355173
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3990348
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3674228
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3790716
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -901767.1
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -921405.5
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2123703
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -5374991
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2226227
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3386057
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1872787
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3551091
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1254241
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2040624
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3611460
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -6385081
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2057123
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1316010
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -295584.8
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2338872
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3006416
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2567166
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1302752
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2406016
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1671299
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -72597.71
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2562961
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3043107
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5093718
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1022334
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3716601
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1396627
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 976005
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -96546.48
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1406843
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -5329075
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 416686.4
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -102773.3
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3115330
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1068125
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1485029
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3722890
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 847575.4
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -644073.2
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2938303
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -228084
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1312436
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1977171
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2920186
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1808449
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -45893.05
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2804217
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -274156.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -317641
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3553812
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 6124487
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2506002
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2893439
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2145328
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2241082
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1795065
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3378528
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 981803.6
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -485273.3
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -6671355
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -768733
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3174114
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -346911.7
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1425594
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 6199020
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5788667
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3321590
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1401294
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 107591.8
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1741277
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4226271
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 394183.7
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3302468
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -140401.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1208361
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2790002
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2920632
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -837206.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -6778217
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2578024
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2468515
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2588458
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2008229
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4345764
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3081518
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1113222
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1092131
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -355978.1
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2616439
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -344269.6
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -186141.1
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2914360
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3535281
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1369313
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 522066.8
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1905726
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2744309
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 4019549
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3784742
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 462888.5
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1719577
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 338646.5
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3645409
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3015618
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1528465
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1707182
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1914885
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4533111
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2603059
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3031292
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4232358
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 345835.5
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1577886
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2007531
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 7235881
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -264870.6
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5641723
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5714594
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2853574
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1410716
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -5843308
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 4810239
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1602910
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 849110.1
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1333600
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3009683
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 343426.3
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1054663
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 612998.3
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -6661169
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1178274
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -264364.5
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4281310
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2252851
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1161303
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 189143.8
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1246893
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2079298
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2883289
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1446956
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1271910
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1500603
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3230099
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 208011.4
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -596918.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4546760
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -974234.8
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1070153
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 6764738
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1954006
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -94534.67
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3980758
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4859320
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -810287.7
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -5564906
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1734752
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1221285
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2990382
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 4149985
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3279638
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2472143
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -379187.4
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3026035
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1939205
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3498877
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -5535561
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2997329
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2236505
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 40908.34
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1765265
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 820362.2
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3504296
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2168558
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2659821
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -5058869
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2866258
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 524523
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -974200
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 214402.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1517492
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -177400.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4689175
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 371448.1
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2567495
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1638529
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1563458
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2791330
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2557416
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -712691.7
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2409769
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 856191.2
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2381688
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2916387
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1525092
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4597151
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 4333121
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -718225.4
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1944294
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 4285002
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 442352.8
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3573586
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1945638
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1581835
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -39012.81
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 898571.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1330224
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3495947
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1774798
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2604796
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2074008
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 600310.6
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 952935.5
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 4177272
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1628107
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 711883.4
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2198573
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3082067
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3006118
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -32610.93
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1159194
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 398839.5
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1049997
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1512477
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2143218
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1353167
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2310284
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2653016
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2699224
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1528723
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1179652
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 6825488
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1951266
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5542194
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3073573
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1379910
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2201715
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4741683
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3629994
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2731008
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 128721.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5876244
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -385899.6
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -273110.5
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2551368
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3979835
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 377963.2
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 631254.8
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1713103
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -377980.2
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1737135
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 4791409
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2417684
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -269510.7
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3866439
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2524496
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 847113.7
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -5113443
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 738041.6
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 6279009
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -5306236
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 193849.7
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4319506
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3795402
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1246299
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2650034
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 947299.6
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2894896
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4962997
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -44766.25
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3850120
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -683400.1
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5860049
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 676304.8
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 67650.96
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1027356
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2631264
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -105655.2
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1300968
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 4624073
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 8225380
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2715684
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2389402
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2991660
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2077857
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3683973
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1230331
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3614534
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 4593838
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -172402.1
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -807836.6
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5499924
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 341406.1
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3380500
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3918513
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2827225
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1641988
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -498529.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3010393
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1214654
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -383216.2
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3702799
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3327023
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 992432.7
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2021175
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5950725
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3749353
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1335822
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -5690074
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1237398
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 385722
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1264650
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2166391
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1899854
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3280471
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 988426.2
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1623257
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 230623.5
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -739987.6
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1017374
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3412157
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -791644.1
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1350730
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 4067394
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -881886.8
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 6648255
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 388369.4
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5525223
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1041336
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2650118
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 445737.1
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3520692
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 7212027
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 807546.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 5650307
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -927675
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1970863
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 983662.5
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -340115.3
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 3211935
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -2349708
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 195905.4
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -344951.7
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 4711363
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -1514516
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -4834808
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1083226
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -6082596
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 6057833
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -748843.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 703619.9
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -3284674
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 -442116.8
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 301761.3
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 1120827
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Calculating likelihood using fixed parameter values: 1.637367e-06 0.2664882 2.150683 2.150683 1.677575e-18 2057784
likelihood.differences<-(-(likelihood.values-max(likelihood.values)))
library(akima)
interpolated.points<-interp(x=theta1.points, y=theta2.points, z= likelihood.differences, linear=FALSE, extrap=TRUE, xo=seq(min(theta1.points), max(theta1.points), length = 400), yo=seq(min(theta2.points), max(theta2.points), length = 400))

contour(interpolated.points, xlim=range(c(theta1.points, theta2.points)),ylim=range(c(theta1.points, theta2.points)), xlab="Theta 1", ylab="Theta 2", levels=c(2,5,10),add=FALSE,lwd=1, bty="n", asp=1)

points(x=best$theta[1,1], y=best$theta[2,1], col="red", pch=16)

points(x=newdat$X[which(newdat$Reg==1)],y=rep(min(c(theta1.points, theta2.points)), length(which(trait$Reg==1))), pch=18, col=rgb(0,0,0,.3)) #the tip values in regime 1, plotted along x axis
points(y=newdat$X[which(newdat$Reg==2)],x=rep(min(c(theta1.points, theta2.points)), length(which(trait$Reg==2))), pch=18, col=rgb(0,0,0,.3)) #the tip values in regime 2, plotted along y axis
library(phytools)
trait.ordered<-data.frame(cleaned.discrete$data[,1], cleaned.discrete$data[,1])
z<-trait.ordered[,1]
names(z)<-rownames(trait.ordered)
tree.mapped<-make.simmap(cleaned.discrete$phy,z,model="ER",nsim=1)
## make.simmap is sampling character histories conditioned on the transition matrix
## 
## Q =
##              1            2
## 1 -0.001864317  0.001864317
## 2  0.001864317 -0.001864317
## (estimated using likelihood);
## and (mean) root node prior probabilities
## pi =
##   1   2 
## 0.5 0.5
## Done.
leg<-c("black","red")
names(leg)<-c(1,2)
plotSimmap(tree.mapped,leg,pts=FALSE,ftype="off", lwd=1)

simmapBased<-OUwie(tree.mapped,newdat,model="OUMV", simmap.tree=TRUE, diagn=FALSE)
## Warning: Some dates are negative? rootAge may be incorrectly defined or you are using a time-scaling method that warps the tree, like aba or zbla.
## Initializing... 
## Finished. Begin thorough search... 
## Finished. Summarizing results.
print(simmapBased)
## 
## Fit
##        lnL      AIC    AICc      BIC model ntax
##  -1472.461 2954.922 2955.16 2972.687  OUMV  258
## 
## 
## Rates
##                     1            2
## alpha    1.276258e-03  0.001276258
## sigma.sq 4.380271e+02 84.996120708
## 
## Optima
##                 1         2
## estimate 264.3087 132.33690
## se       149.1609  53.14754
## 
## 
## Half life (another way of reporting alpha)
##        1        2 
## 543.1091 543.1091 
## 
## Arrived at a reliable solution
print(best)
## 
## Fit
##       lnL      AIC      AICc       BIC model ntax
##  1523.125 -3036.25 -3036.012 -3018.485  OUMA  258
## 
## 
## Rates
##                     1         2
## alpha    1.637367e-06 0.2664882
## sigma.sq 2.150683e+00 2.1506830
## 
## Optima
##                     1           2
## estimate 1.677575e-18    159.0305
## se       0.000000e+00 561805.9172
## 
## 
## Half life (another way of reporting alpha)
##            1            2 
## 4.233304e+05 2.601043e+00 
## 
## Arrived at a reliable solution

Week 8:Correlation models

##Continuous data
library(geiger)
library(ape)
tree.primates <- read.tree(text="((((Homo:0.21,Pongo:0.21):0.28,Macaca:0.49):0.13,Ateles:0.62):0.38,Galago:1.00);") #using examples from ape ?pic
X <- c(4.09434, 3.61092, 2.37024, 2.02815, -1.46968)
Y <- c(4.74493, 3.33220, 3.36730, 2.89037, 2.30259)
names(X) <- names(Y) <- c("Homo", "Pongo", "Macaca", "Ateles", "Galago")
pic.X <- pic(X, tree.primates)
pic.Y <- pic(Y, tree.primates)
##Discrete data
require("corHMM")
## Loading required package: corHMM
## Loading required package: GenSA
?corHMM
data(primates)
ls()
print(primates)
require(phytools)
library(corHMM)
library(phytools)
primates$trait[which(grepl("Hylobates",primates$trait[,1])),2]<-1
trait1<-primates$trait[,2]
names(trait1)<-primates$trait[,1]
primates$tree <- ape::multi2di(primates$tree)
plotSimmap(make.simmap(primates$tree, trait1), pts=FALSE, fsize=0.8)
## make.simmap is sampling character histories conditioned on the transition matrix
## 
## Q =
##             0           1
## 0 -0.01076402  0.01076402
## 1  0.01076402 -0.01076402
## (estimated using likelihood);
## and (mean) root node prior probabilities
## pi =
##   0   1 
## 0.5 0.5
## Done.
## no colors provided. using the following legend:
##       0       1 
## "black"   "red"

rate.mat.er<-rate.mat.maker(rate.cat=1, hrm=FALSE, ntraits=1, nstates=2, model="ER")
print(rate.mat.er)
##    1  2
## 1 NA  1
## 2  1 NA
library(corHMM)
library(phytools)
pp.er<-corHMM(primates$tree,primates$trait[,c(1,2)],rate.cat=1,rate.mat=rate.mat.er,node.states="marginal")
## State distribution in data:
## States:  0   1   
## Counts:  28  32  
## Beginning thorough optimization search -- performing 10 random restarts 
## Finished. Inferring ancestral states using marginal reconstruction. 
## Finished. Performing diagnostic tests.
print(pp.er)
## 
## Fit
##       -lnL     AIC     AICc Rate.cat ntax
##  -23.41535 48.8307 48.89967        1   60
## 
## Rates
##            (0)        (1)
## (0)         NA 0.01076376
## (1) 0.01076376         NA
## 
## Arrived at a reliable solution
# This matrix is the transition rate between state 
library(corHMM)
library(phytools)
rate.mat.ard<-rate.mat.maker(rate.cat=1, hrm=FALSE, ntraits=1, nstates=2, model="ARD")
print(rate.mat.ard)
##    1  2
## 1 NA  2
## 2  1 NA
## The trait 1 can go from 1 to 2. The reverse is also possible with different rates 
library(corHMM)
library(phytools)
pp.ard<-corHMM(primates$tree,primates$trait[,c(1,2)],rate.cat=1,rate.mat=rate.mat.ard,node.states="marginal")
## State distribution in data:
## States:  0   1   
## Counts:  28  32  
## Beginning thorough optimization search -- performing 10 random restarts 
## Finished. Inferring ancestral states using marginal reconstruction. 
## Finished. Performing diagnostic tests.
print(pp.ard)
## 
## Fit
##      -lnL      AIC     AICc Rate.cat ntax
##  -23.4128 50.82561 51.03614        1   60
## 
## Rates
##            (0)        (1)
## (0)         NA 0.01032991
## (1) 0.01128103         NA
## 
## Arrived at a reliable solution
## The first one (ARD)  is  better because it has a smaller AIc 
library(corHMM)
library(phytools)
rate.mat.er.4state<-rate.mat.maker(rate.cat=1, hrm=FALSE, ntraits=1, nstates=4, model="ER")
print(rate.mat.er.4state)
##    1  2  3  4
## 1 NA  1  1  1
## 2  1 NA  1  1
## 3  1  1 NA  1
## 4  1  1  1 NA
library(corHMM)
library(phytools)
fourstate.trait<-rep(NA,Ntip(primates$tree))
for(i in sequence(Ntip(primates$tree))) {
    if(primates$trait[i,2]==0 && primates$trait[i,3]==0) {
        fourstate.trait[i]<-0
    }
    if(primates$trait[i,2]==0 && primates$trait[i,3]==1) {
        fourstate.trait[i]<-1
    }
    if(primates$trait[i,2]==1 && primates$trait[i,3]==0) {
        fourstate.trait[i]<-2
    }
    if(primates$trait[i,2]==1 && primates$trait[i,3]==1) {
        fourstate.trait[i]<-3
    }
}
fourstate.data<-data.frame(Genus_sp=primates$trait[,1], T1=fourstate.trait)

print(rayDISC(primates$tree, fourstate.data, ntraits=1, model="ER", node.states="marginal"))
## State distribution in data:
## States:  0   1   2   3   
## Counts:  18  10  11  21  
## Initializing... 
## Finished. Beginning thorough search... 
## Finished. Inferring ancestral states using marginal reconstruction. 
## 
## Fit
##       -lnL      AIC     AICc ntax
##  -52.96386 107.9277 107.9967   60
## 
## Rates
##             0           1           2           3
## 0          NA 0.006599815 0.006599815 0.006599815
## 1 0.006599815          NA 0.006599815 0.006599815
## 2 0.006599815 0.006599815          NA 0.006599815
## 3 0.006599815 0.006599815 0.006599815          NA
## 
## Arrived at a reliable solution
print(rayDISC(primates$tree, fourstate.data, ntraits=1, rate.mat=rate.mat.er.4state, node.states="marginal", model="ARD"))
## State distribution in data:
## States:  0   1   2   3   
## Counts:  18  10  11  21  
## Initializing... 
## Finished. Beginning thorough search... 
## Finished. Inferring ancestral states using marginal reconstruction. 
## 
## Fit
##       -lnL      AIC     AICc ntax
##  -52.96386 107.9277 107.9967   60
## 
## Rates
##             0           1           2           3
## 0          NA 0.006600801 0.006600801 0.006600801
## 1 0.006600801          NA 0.006600801 0.006600801
## 2 0.006600801 0.006600801          NA 0.006600801
## 3 0.006600801 0.006600801 0.006600801          NA
## 
## Arrived at a reliable solution
rate.mat.ard.4state<-rate.mat.maker(rate.cat=1, hrm=FALSE, ntraits=1, nstates=4, model="ARD")
print(rate.mat.ard.4state)
##    1  2  3  4
## 1 NA  4  7 10
## 2  1 NA  8 11
## 3  2  5 NA 12
## 4  3  6  9 NA
library(corHMM)
library(phytools)
rate.mat.gtr.4state<-rate.mat.ard.4state
rate.mat.gtr.4state<-rate.par.eq(rate.mat.gtr.4state, c(1,4))
rate.mat.gtr.4state<-rate.par.eq(rate.mat.gtr.4state, c(2,6))
rate.mat.gtr.4state<-rate.par.eq(rate.mat.gtr.4state, c(3,8))
rate.mat.gtr.4state<-rate.par.eq(rate.mat.gtr.4state, c(4,6))
rate.mat.gtr.4state<-rate.par.eq(rate.mat.gtr.4state, c(5,7))
rate.mat.gtr.4state<-rate.par.eq(rate.mat.gtr.4state, c(6,7))
print(rate.mat.gtr.4state)
##    1  2  3  4
## 1 NA  1  2  3
## 2  1 NA  4  5
## 3  2  4 NA  6
## 4  3  5  6 NA
print(rayDISC(primates$tree, fourstate.data, ntraits=1, rate.mat= rate.mat.gtr.4state, node.states="marginal", model="ARD"))
## State distribution in data:
## States:  0   1   2   3   
## Counts:  18  10  11  21  
## Initializing... 
## Finished. Beginning thorough search... 
## Finished. Inferring ancestral states using marginal reconstruction. 
## 
## Fit
##      -lnL      AIC     AICc ntax
##  -44.6221 101.2442 102.8291   60
## 
## Rates
##            0           1           2          3
## 0         NA 0.049869953 0.000000000 0.00000000
## 1 0.04986995          NA 0.003180951 0.01923754
## 2 0.00000000 0.003180951          NA 0.00000000
## 3 0.00000000 0.019237539 0.000000000         NA
## 
## Arrived at a reliable solution
library(corHMM)
library(phytools)
print(rate.mat.maker(rate.cat=1, hrm=FALSE, ntraits=2, nstates=2, model="ARD"))
##       (0,0) (0,1) (1,0) (1,1)
## (0,0)    NA     3     5    NA
## (0,1)     1    NA    NA     7
## (1,0)     2    NA    NA     8
## (1,1)    NA     4     6    NA
rate.mat.pag94<-rate.par.drop(rate.mat.ard.4state, drop.par=c(3,5,8,10))
print
## standardGeneric for "print" defined from package "base"
## 
## function (x, ...) 
## standardGeneric("print")
## <environment: 0x7fcb17da47b0>
## Methods may be defined for arguments: x
## Use  showMethods("print")  for currently available ones.
#####Construct a model to test if state 1 can never be lost
CleanData <- function(phy, data) {
  library(rphylotastic)
  speciesNames<-unlist(data[,1], use.names = FALSE)
  cleaned.names.data<-taxa_resolve_names_with_gnr(speciesNames)
  cleaned.names.phy<-taxa_resolve_names_with_gnr(phy$tip.label)
  phy.cleaned.names<-phy
  phy.cleaned.names$tip.label <- cleaned.names.phy
  data.vector<-data[,2]
  names(data.vector)<-cleaned.names.data
  cleaned.data<-treedata(phy.cleaned.names,data.vector, sort=TRUE, warnings=TRUE)
  return(cleaned.data)
}

fourstate.data$T1<-as.factor(fourstate.data$T1)
cleaned.discrete.primate<-CleanData(primates$tree,fourstate.data)
## 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=                                                                     |   2%
  |                                                                            
  |==                                                                    |   3%
  |                                                                            
  |====                                                                  |   5%
  |                                                                            
  |=====                                                                 |   7%
  |                                                                            
  |======                                                                |   8%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |========                                                              |  12%
  |                                                                            
  |=========                                                             |  13%
  |                                                                            
  |==========                                                            |  15%
  |                                                                            
  |============                                                          |  17%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |===============                                                       |  22%
  |                                                                            
  |================                                                      |  23%
  |                                                                            
  |==================                                                    |  25%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |====================                                                  |  28%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |======================                                                |  32%
  |                                                                            
  |=======================                                               |  33%
  |                                                                            
  |========================                                              |  35%
  |                                                                            
  |==========================                                            |  37%
  |                                                                            
  |===========================                                           |  38%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |=============================                                         |  42%
  |                                                                            
  |==============================                                        |  43%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |=================================                                     |  47%
  |                                                                            
  |==================================                                    |  48%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |====================================                                  |  52%
  |                                                                            
  |=====================================                                 |  53%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |========================================                              |  57%
  |                                                                            
  |=========================================                             |  58%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |===========================================                           |  62%
  |                                                                            
  |============================================                          |  63%
  |                                                                            
  |==============================================                        |  65%
  |                                                                            
  |===============================================                       |  67%
  |                                                                            
  |================================================                      |  68%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |==================================================                    |  72%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |====================================================                  |  75%
  |                                                                            
  |======================================================                |  77%
  |                                                                            
  |=======================================================               |  78%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |==========================================================            |  83%
  |                                                                            
  |============================================================          |  85%
  |                                                                            
  |=============================================================         |  87%
  |                                                                            
  |==============================================================        |  88%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |================================================================      |  92%
  |                                                                            
  |=================================================================     |  93%
  |                                                                            
  |==================================================================    |  95%
  |                                                                            
  |====================================================================  |  97%
  |                                                                            
  |===================================================================== |  98%
  |                                                                            
  |======================================================================| 100%
## 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=                                                                     |   2%
  |                                                                            
  |==                                                                    |   3%
  |                                                                            
  |====                                                                  |   5%
  |                                                                            
  |=====                                                                 |   7%
  |                                                                            
  |======                                                                |   8%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |========                                                              |  12%
  |                                                                            
  |=========                                                             |  13%
  |                                                                            
  |==========                                                            |  15%
  |                                                                            
  |============                                                          |  17%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |===============                                                       |  22%
  |                                                                            
  |================                                                      |  23%
  |                                                                            
  |==================                                                    |  25%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |====================                                                  |  28%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |======================                                                |  32%
  |                                                                            
  |=======================                                               |  33%
  |                                                                            
  |========================                                              |  35%
  |                                                                            
  |==========================                                            |  37%
  |                                                                            
  |===========================                                           |  38%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |=============================                                         |  42%
  |                                                                            
  |==============================                                        |  43%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |=================================                                     |  47%
  |                                                                            
  |==================================                                    |  48%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |====================================                                  |  52%
  |                                                                            
  |=====================================                                 |  53%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |========================================                              |  57%
  |                                                                            
  |=========================================                             |  58%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |===========================================                           |  62%
  |                                                                            
  |============================================                          |  63%
  |                                                                            
  |==============================================                        |  65%
  |                                                                            
  |===============================================                       |  67%
  |                                                                            
  |================================================                      |  68%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |==================================================                    |  72%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |====================================================                  |  75%
  |                                                                            
  |======================================================                |  77%
  |                                                                            
  |=======================================================               |  78%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |==========================================================            |  83%
  |                                                                            
  |============================================================          |  85%
  |                                                                            
  |=============================================================         |  87%
  |                                                                            
  |==============================================================        |  88%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |================================================================      |  92%
  |                                                                            
  |=================================================================     |  93%
  |                                                                            
  |==================================================================    |  95%
  |                                                                            
  |====================================================================  |  97%
  |                                                                            
  |===================================================================== |  98%
  |                                                                            
  |======================================================================| 100%
library(geiger)
model<-matrix(
  c(0,1,0,0,
    0,0,1,0,
    0,1,0,0,
    1,1,1,0),
  nrow = 4,
  ncol = 4,
  byrow = TRUE)


rownames(model)<-colnames(model)<-c("(0,0)","(0,1)","(1,0)","(1,1)")
fit<-fitDiscrete(cleaned.discrete.primate$phy,cleaned.discrete.primate$data,model=model)
## Warning in fitDiscrete(cleaned.discrete.primate$phy, cleaned.discrete.primate$data, : Parameter estimates appear at bounds:
##  q13
##  q14
##  q21
##  q24
##  q31
##  q34
# Let's assume that 0=(0,0), 1=(0,1), 2=(1,0), 3=(1,1)
plot(fit,show.zeros=FALSE,signif=1)
title(main="state 1 never lost")

library(geiger)
#Create and use a model to see if transitions from 00 go to 11 only via 01.
model1<-matrix(
  c(0,1,0,0,
    0,0,0,1,
    0,0,0,0,
    0,0,0,0),
  nrow = 4,
  ncol = 4,
  byrow = TRUE)


rownames(model1)<-colnames(model)<-c("(0,0)","(0,1)","(1,0)","(1,1)")



fit0011<-fitDiscrete(cleaned.discrete.primate$phy,cleaned.discrete.primate$data,model=model1)
## Warning in fitDiscrete(cleaned.discrete.primate$phy, cleaned.discrete.primate$data, : Parameter estimates appear at bounds:
##  q13
##  q14
##  q21
##  q23
##  q31
##  q32
##  q34
##  q41
##  q42
##  q43
# Let's assume that 0=(0,0), 1=(0,1), 2=(1,0), 3=(1,1)
plot(fit0011,show.zeros=FALSE,signif=1)
title(main="transitions from (0,0) go to (1,1) \n only via (0,1)")

week 9: Diversification

#install.packages(c("ape", "TreeSim", "geiger", "diversitree", "devtools"))
library(ape)
library(TreeSim)
library(geiger)
library(diversitree)
#devtools::install_github("thej022214/hisse")
library(hisse)
## Loading required package: deSolve
## Loading required package: subplex
my.tree <- TreeSim::sim.bd.taxa(n=300, numbsim=1, lambda=0.1, mu=0)[[1]]
ape::ltt.plot(my.tree)

ape::ltt.plot(my.tree, log="y")

yule.trees <- TreeSim::sim.bd.taxa(n=300, numbsim=10, lambda=0.1, mu=0, complete=FALSE)
#stop("How to do a multiple ltt pl
bd.trees <- TreeSim::sim.bd.taxa(n=300, numbsim=10, lambda=1, mu=.9, complete=FALSE)
ape::mltt.plot(bd.trees, log="y", legend=FALSE)

depth.range <- range(unlist(lapply(yule.trees,ape::branching.times)), unlist(lapply(bd.trees,ape::branching.times)))
max.depth <- sum(abs(depth.range)) #ape rescales depths
plot(x=c(0, -1*max.depth), y=c(1, ape::Ntip(yule.trees[[1]])), log="y", type="n", bty="n", xlab="Time", ylab="N")
colors=c(rgb(1,0,0,0.5), rgb(0, 0, 0, 0.5))
list.of.both <- list(bd.trees, yule.trees)
for (i in sequence(2)) {
    tree.list <- list.of.both[[i]]
    for (j in sequence(length(tree.list))) {
        ape::ltt.lines(tree.list[[j]], col=colors[[i]])
    }
}
legend("topleft", legend=c("Birth Death", "Yule"), fill=colors)

depth.range <- range(unlist(lapply(yule.trees,ape::branching.times)), unlist(lapply(bd.trees,ape::branching.times)))
max.depth <- sum(abs(depth.range)) #ape rescales depths
plot(x=c(0, -5), y=c(200, ape::Ntip(yule.trees[[1]])), log="y", type="n", bty="n", xlab="Time", ylab="N")
colors=c(rgb(1,0,0,0.5), rgb(0, 0, 0, 0.5))
list.of.both <- list(bd.trees, yule.trees)
for (i in sequence(2)) {
    tree.list <- list.of.both[[i]]
    for (j in sequence(length(tree.list))) {
        ape::ltt.lines(tree.list[[j]], col=colors[[i]])
    }
}
legend("topleft", legend=c("Birth Death", "Yule"), fill=colors)

my.trees <- TreeSim::sim.bd.taxa(n=400, numbsim=10, lambda=0.7, mu=0.3, complete=FALSE)
ape::mltt.plot(my.trees, log="y", legend=FALSE)

## When the  speciation rate is much higher than extinction rate
library(diversitree)
speciation.rates <- c(0.1, 0.1, 0.1, 0.2) #0A, 1A, 0B, 1B
extinction.rates <- rep(0.03, 4)
transition.rates <- c(0.01,0.01,0, 0.01, 0, 0.01, 0.01,0,0.01, 0,0.01,0.01)
pars <- c(speciation.rates, extinction.rates, transition.rates)
phy <- tree.musse(pars, max.taxa=50, x0=1, include.extinct=FALSE)
sim.dat.true <- data.frame(names(phy$tip.state), phy$tip.state)
sim.dat <- sim.dat.true
# Now to hide the "hidden" state
sim.dat[sim.dat[,2]==3,2] = 1
sim.dat[sim.dat[,2]==4,2] = 2
# and convert states 1,2 to 0,1
sim.dat[,2] = sim.dat[,2] - 1
plot(phy)

library(knitr)
knitr::kable(cbind(sim.dat, true.char=sim.dat.true$phy.tip.state))
names.phy.tip.state. phy.tip.state true.char
sp8 sp8 0 1
sp11 sp11 0 3
sp13 sp13 0 1
sp14 sp14 0 1
sp15 sp15 0 1
sp16 sp16 1 2
sp18 sp18 0 1
sp19 sp19 0 3
sp20 sp20 0 3
sp21 sp21 0 1
sp22 sp22 0 1
sp23 sp23 0 1
sp26 sp26 0 1
sp27 sp27 0 3
sp28 sp28 0 1
sp29 sp29 1 2
sp30 sp30 1 4
sp31 sp31 0 1
sp32 sp32 0 1
sp33 sp33 0 1
sp34 sp34 0 1
sp35 sp35 0 1
sp38 sp38 0 3
sp39 sp39 0 3
sp40 sp40 0 1
sp41 sp41 0 1
sp42 sp42 0 3
sp43 sp43 0 1
sp44 sp44 0 1
sp45 sp45 0 1
sp46 sp46 0 1
sp47 sp47 0 1
sp48 sp48 0 1
sp49 sp49 1 2
sp50 sp50 1 2
sp51 sp51 0 1
sp52 sp52 0 3
sp53 sp53 0 3
sp54 sp54 0 3
sp55 sp55 0 1
sp56 sp56 0 1
sp57 sp57 0 1
sp58 sp58 0 1
sp59 sp59 0 1
sp60 sp60 0 1
sp61 sp61 1 2
sp62 sp62 0 1
sp63 sp63 0 1
sp64 sp64 1 2
sp65 sp65 1 2
turnover.anc = c(1,1,0,0)
eps.anc = c(1,1,0,0)
eps.anc = c(0,0,0,0)
trans.rates = TransMatMaker(hidden.states=TRUE)
trans.rates
##      (0A) (1A) (0B) (1B)
## (0A)   NA    4    7   10
## (1A)    1   NA    8   11
## (0B)    2    5   NA   12
## (1B)    3    6    9   NA
trans.rates.nodual = ParDrop(trans.rates, c(3,5,8,10))
trans.rates.nodual
##      (0A) (1A) (0B) (1B)
## (0A)   NA    3    5    0
## (1A)    1   NA    0    7
## (0B)    2    0   NA    8
## (1B)    0    4    6   NA
trans.rates.nodual.equal16 = ParEqual(trans.rates.nodual, c(1,6))
trans.rates.nodual.equal16
##      (0A) (1A) (0B) (1B)
## (0A)   NA    3    5    0
## (1A)    1   NA    0    6
## (0B)    2    0   NA    7
## (1B)    0    4    1   NA
trans.rates.nodual.allequal = ParEqual(trans.rates.nodual, c(1,2,1,3,1,4,1,5,1,6,1,7,1,8))
trans.rates.nodual.allequal
##      (0A) (1A) (0B) (1B)
## (0A)   NA    1    1    0
## (1A)    1   NA    0    1
## (0B)    1    0   NA    1
## (1B)    0    1    1   NA
trans.rates.nodual.allequal = trans.rates.nodual
trans.rates.nodual.allequal[!is.na(trans.rates.nodual.allequal) & !trans.rates.nodual.allequal == 0] = 1
trans.rates.nodual.allequal
##      (0A) (1A) (0B) (1B)
## (0A)   NA    1    1    0
## (1A)    1   NA    0    1
## (0B)    1    0   NA    1
## (1B)    0    1    1   NA
trans.rates.bisse = TransMatMaker(hidden.states=FALSE)
trans.rates.bisse
##     (0) (1)
## (0)  NA   2
## (1)   1  NA
trans.rates.nodual.allequal = trans.rates.nodual
trans.rates.nodual.allequal[!is.na(trans.rates.nodual.allequal) & !trans.rates.nodual.allequal == 0] = 1
trans.rates.nodual.allequal
##      (0A) (1A) (0B) (1B)
## (0A)   NA    1    1    0
## (1A)    1   NA    0    1
## (0B)    1    0   NA    1
## (1B)    0    1    1   NA
pp = hisse(phy, sim.dat, f=c(1,1), hidden.states=TRUE, turnover.anc=turnover.anc,
           eps.anc=eps.anc, trans.rate=trans.rates.nodual.allequal)
## Initializing... 
## Finished. Beginning bounded subplex routine... 
## Finished. Summarizing results...
##A common mistake
turnover.anc = c(1,2,0,3)
eps.anc = c(1,2,0,3)
trans.rates <- TransMatMaker(hidden.states=TRUE)
trans.rates.nodual.no0B <- ParDrop(trans.rates, c(2,3,5,7,8,9,10,12))
trans.rates.nodual.no0B
##      (0A) (1A) (0B) (1B)
## (0A)   NA    2    0    0
## (1A)    1   NA    0    4
## (0B)    0    0   NA    0
## (1B)    0    3    0   NA
pp = hisse(phy, sim.dat, f=c(1,1), hidden.states=TRUE, turnover.anc=turnover.anc,
           eps.anc=eps.anc, trans.rate=trans.rates.nodual.allequal, output.type="net.div")
## Initializing... 
## Finished. Beginning bounded subplex routine... 
## Finished. Summarizing results...
load("testrecon1.rda")
class(pp.recon)
## [1] "hisse.states"
pp.recon
## 
## Phylogenetic tree with 50 tips and 49 internal nodes.
## 
## Tip labels:
##  sp15, sp57, sp58, sp49, sp50, sp42, ...
## Node labels:
##  1, 3, 1, 1, 1, 1, ...
## 
## Rooted; includes branch lengths.
plot.hisse.states(pp.recon, rate.param="net.div", show.tip.label=FALSE)

## $rate.tree
## Object of class "contMap" containing:
## 
## (1) A phylogenetic tree with 50 tips and 49 internal nodes.
## 
## (2) A mapped continuous trait on the range (0.066161, 0.069176).
## 
## 
## $state.tree
## Object of class "contMap" containing:
## 
## (1) A phylogenetic tree with 50 tips and 49 internal nodes.
## 
## (2) A mapped continuous trait on the range (0, 1.001).
plot.hisse.states(pp.recon, rate.param="net.div", show.tip.label=FALSE, rate.range=c(0,0.072))

## $rate.tree
## Object of class "contMap" containing:
## 
## (1) A phylogenetic tree with 50 tips and 49 internal nodes.
## 
## (2) A mapped continuous trait on the range (0, 0.072072).
## 
## 
## $state.tree
## Object of class "contMap" containing:
## 
## (1) A phylogenetic tree with 50 tips and 49 internal nodes.
## 
## (2) A mapped continuous trait on the range (0, 1.001).
pp.recon$aic
## [1] 364.8615
pp.recon = MarginRecon(phy, sim.dat, f=c(1,1), hidden.states=TRUE, pars=pp$solution,
                       aic=pp$aic, n.cores=2)
hisse.results.list = list()
load("testrecon1.rda")
hisse.results.list[[1]] = pp.recon
load("testrecon2.rda")
hisse.results.list[[2]] = pp.recon
load("testrecon3.rda")
hisse.results.list[[3]] = pp.recon
# Now supply the list the plotting function
plot.hisse.states(hisse.results.list, rate.param="net.div", show.tip.label=FALSE, rate.range=c(0,0.072))

## $rate.tree
## Object of class "contMap" containing:
## 
## (1) A phylogenetic tree with 50 tips and 49 internal nodes.
## 
## (2) A mapped continuous trait on the range (0, 0.072072).
## 
## 
## $state.tree
## Object of class "contMap" containing:
## 
## (1) A phylogenetic tree with 50 tips and 49 internal nodes.
## 
## (2) A mapped continuous trait on the range (0, 1.001).
# First, suck in all the files with .Rsave line ending in your working directory:
files = system("ls -1 | grep .rda", intern=TRUE)
# Create an empty list object
hisse.results.list = list()
# Now loop through all files, adding the embedded pp.recon object in each
for(i in sequence(length(files))){
  load(files[i])
  hisse.results.list[[i]] = pp.recon
  rm(pp.recon)
}